home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ASME's Mechanical Engine…ing Toolkit 1997 December
/
ASME's Mechanical Engineering Toolkit 1997 December.iso
/
elec_eng
/
eepddsk2.lzh
/
UMATCH.BAS
< prev
next >
Wrap
BASIC Source File
|
1980-01-01
|
4KB
|
136 lines
100 REM program for MICROSTRIP MATCHING
110 PRINT "ENTER DATA";
120 INPUT A,B,C,D,E,F,G,H,I
130 IF A < 1 THEN 160
140 IF A > 3 THEN 160
150 GOTO 180
160 PRINT "INPUT DATA NOT IN CORRECT FORMAT. RETYPE IT."
170 GOTO 110
180 PRINT
190 PRINT
200 PRINT " DATA ENTERED"
210 PRINT
220 IF A<>1 THEN 410
230 IF C<>0 THEN 160
240 PRINT " SOURCE IMPEDANCE = ",B,"OHMS"
250 IF E>=0 THEN 270
260 IF E<0 THEN 290
270 PRINT " IMPEDANCE NUMBER 1 = ",D;"+J";ABS(E),"OHMS"
280 GOTO 360
290 PRINT " IMPEDANCE NUMBER 1 = ",D;"-J";ABS(E),"OHMS"
300 GOTO 360
310 IF E>=0 THEN 330
320 IF E<=0 THEN 350
330 PRINT " IMPEDANCE NUMBER 2 = ",D;"+J";ABS(E),"OHMS"
340 GOTO 360
350 PRINT " IMPEDANCE NUMBER 2 = ",D;"-J";ABS(E),"OHMS"
360 PRINT " FREQUENCY = ",F,"GHZ"
370 PRINT " DIELECTRIC CONSTANT = ",G
380 PRINT " SUBSTRATE THICKNESS = ",H,"IN"
390 PRINT " CONDUCTOR THICKNESS = ",I,"IN"
400 GOTO 530
410 IF A=3 THEN 440
420 PRINT " LOAD IMPEDANCE = ",B,"OHMS"
430 GOTO 310
440 IF E<0 THEN 470
450 PRINT " IMPEDANCE NUMBER 3 = ",D;"+J";ABS(E),"OHMS"
460 GOTO 480
470 PRINT " IMPEDANCE NUMBER 3 = ",D;"-J";ABS(E),"OHMS"
480 IF C<0 THEN 510
490 PRINT " IMPEDANCE NUMBER 4 = ",B;"+J";ABS(C),"OHMS"
500 GOTO 360
510 PRINT " IMPEDANCE NUMBER 4 = ",B;"-J";ABS(C),"OHMS"
520 GOTO 360
530 IF D-B=0 THEN 570
540 LET Y=((C*D+B*E)*(E+(((D-B)*(B*D-C*E))/((C*D)+(B*E)))-C))/(D-B)
550 IF Y<=0 THEN 570
560 GOTO 600
570 PRINT
580 PRINT "BASIC MATCH NOT POSSIBLE WITH DATA ENTERED.
590 GOTO 1400
600 LET Z=SQR(Y)
610 PRINT
620 IF A=3 THEN 680
630 IF A=2 THEN 660
640 PRINT " INPUT NETWORK LINE PARAMETERS"
650 GOTO 690
660 PRINT " OUTPUT NETWORK LINE PARAMETERS"
670 GOTO 690
680 PRINT " INTERSTAGE NETWORK LINE PARAMETERS"
690 PRINT
700 LET X=Z*(D-B)
710 LET W=C*D+B*E
720 IF X=0 THEN 800
730 IF W=0 THEN 850
740 LET R=ABS(X/W)
750 IF R>2^24 THEN 850
760 LET Q=(ATN(X/W)*(180/3.14159265#))
770 IF W>0 THEN 870
780 LET K=Q+((X/ABS(X))*180)
790 GOTO 880
800 IF W=0 THEN 880
810 IF W<0 THEN 830
820 GOTO 740
830 LET K=180
840 GOTO 880
850 LET K=(X/ABS(X))*90
860 GOTO 880
870 LET K=Q
880 LET M=K/360
890 IF M<0 THEN 920
900 LET N=M
910 GOTO 930
920 LET N=.5 +M
930 IF F=0 THEN 570
940 LET O=2.997925E+10/(F*2.54E+09)
950 IF G<=0 THEN 570
960 LET L1=(N*O)/SQR(G)
970 IF H<=0 THEN 570
980 IF I<=0 THEN 570
990 LET P=0
1000 LET E1=(I/3.14159265#)*(LOG((2*H)/I)+1)
1010 LET T1=0
1020 LET T2=E1+T1
1030 LET P9=376.819437#*H
1040 LET E2=P9/(SQR(G)*T2*(1+1.735*G^(-7.240001E-02)*(T2/H)^(-.836)))
1050 LET D1=E2-Z
1060 IF P=1 THEN 1150
1070 IF P=2 THEN 1210
1080 IF P=3 THEN 1270
1090 IF D1<0 THEN 1120
1100 LET T1=T1+.01
1110 GOTO 1020
1120 LET T1=T1-.01
1130 LET P=1
1140 GOTO 1020
1150 IF D1<0 THEN 1180
1160 LET T1=T1+.001
1170 GOTO 1020
1180 LET T1=T1-.001
1190 LET P=2
1200 GOTO 1020
1210 IF D1<0 THEN 1240
1220 LET T1 = T1+.0001
1230 GOTO 1020
1240 LET T1=T1-.0001
1250 LET P=3
1260 GOTO 1020
1270 IF D1 < 0 THEN 1300
1280 LET T1=T1+.00001
1290 GOTO 1020
1300 LET T1=T1-.00001
1310 LET W2=T1/H
1320 IF W2>=.6 THEN 1350
1330 LET K1=SQR(G/(1+.6*(G-1)*((T2/H)^.0297)))
1340 GOTO 1360
1350 LET K1=SQR(G/(1+.63*(G-1)*((T2/H)^.1255)))
1360 LET L=L1*K1
1370 PRINT " IMPEDANCE =",Z,"OHMS"
1380 PRINT " LENGTH =",L,"IN."
1390 PRINT " WIDTH =",T1,"IN."
1400 PRINT
1410 PRINT
1420 PRINT
1430 GOTO 110
1440 END